/* eslint-disable global-require,import/no-dynamic-require */
import main from '../components/main';

export default [
  {
    path: '/',
    name: 'index',
    component: main,
    redirect: '/home',
  },
  {
    path: '/home',
    component: resolve => require(['../view/home/index'], resolve),
    children: [
      {
        path: 'specialSale',
        component: resolve => require(['../view/home/specialSale'], resolve),
      },
      {
        path: 'infant',
        component: resolve => require(['../view/home/infant'], resolve),
      },
      {
        path: 'costume',
        component: resolve => require(['../view/home/costume'], resolve),
      },
      {
        path: 'shoe',
        component: resolve => require(['../view/home/shoe'], resolve),
      },
      {
        path: 'food',
        component: resolve => require(['../view/home/food'], resolve),
      },
    ],
  },
  {
    path: '/brandsale',
    name: 'brandSale',
    component: resolve => require(['../view/sale/index'], resolve),
  },
  {
    path: '/live',
    name: 'live',
    component: resolve => require(['../view/live/index'], resolve),
  },
  {
    path: '/car',
    name: 'car',
    component: resolve => require(['../view/car/index'], resolve),
  },
  {
    path: '/myself',
    name: 'myself',
    component: resolve => require(['../view/my/index'], resolve),
  },
  {
    path: '*',
    meta: {
      title: '页面不存在',
    },
    component: resolve => require(['../view/other/error'], resolve),
  },
];


/**
  说明：
  1、redirect ：请求重定向.

 * */
